home *** CD-ROM | disk | FTP | other *** search
-
- > Hi all!
-
- > I badly need some decopression routines so I just wondered is there
- > any lib extensions for blitz which contains some commands to unpack
- > powerpacked data files - something like unpack (filename$,from adr,to
- > adr). Thanx!
-
- > O.T.T. (ott@microlnk.ml.ee)
-
- Well you may like to try the undocumented commands "implode" and
- "Deplode". there syntax is as follows:
-
- "
- IMPLODE: Error/crunched
- length = Implode (Buffer Address, Data Length)
-
- DEPLODE: Success(Buffer Address)
-
- The Implode command requires an address in memory to start its
- compressions from, and the length of the data you want to pack.
- The screen colours will flash during the compression process to let
- you know it's working. If the compression was successful, you'll
- be returned the new length of the imploded data, otherwise an error
- code.
-
- The Deplode command only requires the address in memory that your
- compressed data is located at, and it will set to work
- uncompressing it.
-
- The problem is, the Deplode will expand the data out to its
- original length regardless of your buffersize, so it is vital that
- you allocate enough memory to hold the uncompressed data length,
- not just the size of the compresses data.
-
- Most of the time this won;t be a problem, since it will have been
- you that created the packed file. Luckily, the compressed data
- stores the expanded length of the data in the second longword of
- the file, so it's possible to read this if you are unsure of the
- uncompressed data's length.
- "
-
- The above info, was taken from The Australian Commodore and Amiga
- Review, May edition.
-
- Dave
- -----------------------------------------------------------
- Dave Cole | Please contact me for info
- s933384@yallara.cs.rmit.oz.au | about
- s933384@minyos.xx.rmit.oz.au | The Warhammer
- David_Cole@guru.apana.org.au | Compendium
- -----------------------------------------------------------
-
-